#

| Chapter 12 Nroff and Troff |

## .nr

    .nr r n [m]

Assign value `n` to number register `r`, and optionally set auto-increment to `m`.

### Examples

Set the "box width" register to line length minus indent:

>     .nr BW \n(.l-\n(.i

Set page layout values for ms macros:

>     .nr LL 6i	\" line length
>     .nr PO ((8.25i-\n(LLu)/2u)	\" page offset
>     .nr VS /n(PS+2	\" vertical spacing

In sqtroff, auto-increment a footnote-counter register:

>     .nr footcount 0 1      \" Reset to zero on each page

Note: inside a macro definition, `\n` should be `\\n`.

Reference: .nn |  | Reference: .ns